package com.bjpowernode.beans;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyBeans implements Serializable {

    @Max(value = 10, message = "不能超过10")
    @Min(value = 1, message = "不能小于1")
    int id;
    @NotNull(message = "不能为空")
    String name;

}
